<header id="page-header"> 
    <h1>Aboneler</h1> 
</header>

<nav id="shortcuts">
    <ul>
        <li><a href="<?php echo site_url('backend/import/step1') ?>" class="add">Yükle</a></li>
    </ul>
    <br class="clear-both" />
</nav>

<div class="filter">
    <form method="get" action="<?php echo current_url(); ?>">
        <ul>
			<li><?php echo form_dropdown('group_id', $groups, _get('group_id', NULL)); ?></li>
			<li><?php echo form_dropdown('gender', $genders, _get('gender', NULL)); ?></li>
            <li><input type="text" name="needle" value="<?php echo _get('needle', NULL); ?>" /></li>
            <li><input type="submit" value="Ara" /></li>
        </ul>
    </form>
    <br class="clear-both" />
</div>

<div id="content">
	<?php echo $this->session->flashdata('status') ?>
	
	<h3>Aboneler (<?php echo $result['total_rows']; ?>)</h3>

	<table class="list">

		<thead>
			<tr>
				<th>Mail Adres</th>
				<th>Ad</th>
				<th>Soyad</th>
				<th>Cinsiyet</th>
				<th>Durum</th>
				<th>Grup</th>
				<th>Eklenme Tarihi</th>
				<th>İşlemler</th>
			</tr>
		</thead>

		<tbody>
			<?php if($result['total_rows']): ?>
				<?php foreach ($result['rows'] as $row): ?>
					<tr >
						<td><?php echo $row->address ?></td>
						<td><?php echo $row->firstname ?></td>
						<td><?php echo $row->lastname ?></td>
						<td><?php echo $genders[$row->gender]; ?></td>
						<td><?php echo $statuses[$row->status] ?></td>
						<td><?php echo $row->group_name; ?></td>
						<td><?php echo format_date($row->date_add) ?></td>
                        <td>
                            <a href="<?php echo site_url("backend/subscriber/edit/{$row->id}"); ?>" class="colorbox_tip2" title="Düzenle"><img src="assets/backend/icon/luna/edit.png" alt="" /></a>
                            <a href="<?php echo site_url("backend/subscriber/delete/{$row->group_id}/{$row->id}"); ?>" title="Sil" onclick="return confirm('Silme İşlemini Onaylıyormusunuz?')"><img src="assets/backend/icon/luna/trash.png" alt="" /></a>
                        </td>
					</tr>
				<?php endforeach; ?>
			<?php else: ?>

				<tr>
					<td colspan="8">
						<div class="notification info">Bu gurupta herhangi bir abone bulunmamaktadır.</div>
					</td>
				</tr>

			<?php endif; ?>
		</tbody>

	</table>

	<?php echo $pagination; ?>

</div><!-- // #content -->
